﻿using System;
using System.Linq;
using System.Collections.Generic;
using System.Text;

namespace Entities
{
    public class ERecloser : EBase
    {
        #region - Properties -
        
        public double Latitude { get; set; }
        public double Longitude { get; set; }
        public EPole Pole {get;set;}
        public DateTime CreatedDate { get; set; }
        public string Manufacturer { get; set; }
        public string SerialNumber {get; set;}
        public DateTime ManufDate { get; set; }
        public string PoleNumber { get; set; }
        public ETransformerLookUp Phase { get; set; }
        public string MaxkV { get; set; }
        public string Type { get; set; }
        public int CurveA { get; set; }
        public int CurveB { get; set; }
        public int CurveC { get; set; }
        public int CurveD { get; set; }
        public ETransformerLookUp Interrupter { get; set; }
        public bool Pre1978 { get; set; }
        public ETransformerLookUp PCBType { get; set; }
        public string PPM { get; set; }
        public ETransformerLookUp DeterminedBy { get; set; }
        public bool Sticker { get; set; }
        public string Comments {get; set;}
        public string TestNumber { get; set; }

        public List<ETransformerLookUp> Notes { get; set; }
        public List<EImage> Images { get; set; }

        public bool ValidPosition
        {
            get
            {
                return !((Latitude.Equals(0) || Latitude.Equals(double.MinValue)) &&
                         (Longitude.Equals(0) || Longitude.Equals(double.MinValue)));
            }
        }

        #endregion

        #region - Constructor -

        public ERecloser()
        {
            Latitude = 0;
            Longitude = 0;
            CreatedDate = DateTime.MinValue;
            Manufacturer = string.Empty;
            SerialNumber = string.Empty;
            ManufDate = DateTime.MinValue;
            PoleNumber = string.Empty;
            MaxkV = string.Empty;
            Type = string.Empty;
            CurveA = int.MinValue;
            CurveB = int.MinValue;
            CurveC = int.MinValue;
            CurveD = int.MinValue;
            Pre1978 = false;
            PPM = string.Empty;
            Sticker = false;
            Comments = string.Empty;
            TestNumber = string.Empty;
        }

        #endregion
    }
}
